package com.whenjun.util;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * @Auther: whenjun
 * @Date: 2023/7/25 00:01
 * @Description:
 */
public class IPageUtil {

    public static IPage trans(IPage<?> iPage){
        IPage resp = new Page<>();
        resp.setCurrent(iPage.getCurrent());
        resp.setPages(iPage.getPages());
        resp.setSize(iPage.getSize());
        resp.setTotal(iPage.getTotal());
        resp.setRecords(iPage.getRecords());

        return resp;
    }
}
